package h_eekwan.basic;

public class J07_CalrenderV1 {

	public static void main(String[] args) {
		// 2005년 1월 달력 출력
		
		final String TITLE = "\tJanuary 2005";
		final String HDRLINE = "------------------------------------------------------------";
		final String HDRDAYS = "Sun\tMon\tTue\tWen\tThu\tFri\tSat";
		
		System.out.println(TITLE);
		System.out.println(HDRLINE);
		System.out.println(HDRDAYS);
		
		
		/*
		for(int i = 1; i<=31; ++i){
			if( i % 7 !=0)
			System.out.print("\t"+i);
			else
			System.out.println("\t "+i);
		}*/
		
		int skipday = 6;
		// 달력 출력 v2 (공백 포함)
		
		for(int i = 1; i<=31+6; ++i, --skipday){
			if( skipday >=1) {
				System.out.print(" " + "\t");			
			}else if( i % 7 ==0)
				System.out.println((i-6)+"\t");
			else
				System.out.print((i-6)+"\t");			
		}
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
		
	}

}
